package com.s3.khospitalds.controller;

import com.s3.khospitalds.common.R;
import com.s3.khospitalds.service.StockremovalService;
import com.s3.khospitalds.service.impl.StockremovalServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: xw
 * @CreateTime: 2025/3/3
 * @Description: 药库配送表
 * @Version: 1.0
 */
@RestController
@CrossOrigin(origins = "*")
public class StockremovalController {
    @Autowired
    private StockremovalServiceImpl stockremovalService;
    @GetMapping("/getAllStockremoval")
    public R getAllStockremoval() {
        return new R().addData("list",stockremovalService.list());
    }
    @PostMapping("/deliveryStockremoval/{time}/{id}")
    public R updateOutOfTime(@RequestBody @PathVariable("time") String outOfTime,@PathVariable("id") int id){
        return new R().addData("bol", stockremovalService.updateOutOfTime(outOfTime, id));
    }
}
